This resource endpoint updates a given query roleset using a name or id passed in the URL.
A successful call to the endpoint will return 204 (No Content), the server successfully processed the request and is not returning any content.A response code of 400 (Bad Request) indicates that the query roleset does not exist or the payload is malformed. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges for this action.
Consumes | |
---|---|
application/json | JSON Content |
application/xml | XML Content |
Produces | |
---|---|
application/json | JSON Content |
application/xml | XML Content |
manage-admin
role, or the following privilege:
http://marklogic.com/xdmp/privileges/manage
query-roleset
This is a complex structure with the following children:
role-id
role-name
Assume the file properties.xml has the following contents: <query-roleset-properties xmlns="http://marklogic.com/manage/query-roleset/properties"> <query-roleset> <role-name>els-role-1</role-name> <role-name>els-role-2</role-name> <role-name>els-role-3</role-name> </query-roleset> </query-roleset-properties> curl --anyauth --user username:password -i -X PUT -H "Content-type: application/xml" \ -d @./properties.xml \ http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties ==> MarkLogic returns a response similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5
curl --anyauth --user username:password -i -X PUT -H "Content-type: application/json" \ -d '{ "role-name": ["els-role-1", "els-role-2", "els-role-3" ] }' \ http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties ==> MarkLogic returns a response similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5